<template>
  <div v-loading="loading" class="app-container">
    <span class="filter-item" style="font-weight:bold;font-size:18px;">商品维护状态数据：</span>
    <div style="padding-top:5px">
      <el-table ref="dataTab" :data="data" stripe size="small" border style="width: 100%;" @header-dragend="colChange">
        <el-table-column :show-overflow-tooltip="true" label="提交人类型" prop="createdBy" :width="colWidths.createdBy" />
        <el-table-column :show-overflow-tooltip="true" label="业务类型" prop="changeTypeTxt" :width="colWidths.changeTypeTxt" />
        <el-table-column :show-overflow-tooltip="true" label="部门" prop="deptNbr" :width="colWidths.deptNbr" />
        <el-table-column :show-overflow-tooltip="true" label="数据状态" prop="itemStatusTxt" :width="colWidths.itemStatusTxt" />
        <el-table-column :show-overflow-tooltip="true" label="商品数" prop="itemNum" :width="colWidths.itemNum" />
      </el-table>
      <!--分页组件-->
      <el-pagination
        :total="total"
        :current-page.sync="currentPage"
        :page-sizes="[10,50,100,500]"
        style="margin-top: 8px;"
        layout="total, prev, pager, next, sizes"
        @size-change="sizeChange"
        @current-change="pageChange"
      />
    </div>
  </div>
</template>

<script>
import initData from '@/utils/initData'

export default {
  mixins: [initData],
  props: {
    parent: {
      type: Object,
      default: null
    }
  },
  data() {
    return {
      loading: false
    }
  },
  methods: {
    beforeInit() {
      this.url = '/report/getChangeItemStatusReport'
      this.params.pageNum = this.page
      this.params.pageSize = this.size
      this.params.findTimeStart = this.parent.param.findTimeStart
      this.params.findTimeEnd = this.parent.param.findTimeEnd
      this.params.deptNbr = this.parent.param.deptNbr
      console.log(this.params)
      return true
    },
    // 查询
    toQuery() {
      this.page = 0
      this.currentPage = 1
      this.init()
    }
  }
}
</script>

